Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client/http: handle 503/leader/primary change to schedule member check #8223

Closed
wants to merge 4 commits into from

Conversation

JmPotato
Copy link
Member

@JmPotato JmPotato commented May 29, 2024

What problem does this PR solve?

Issue Number: ref #8142, ref #7300.

What is changed and how does it work?

- Schedule a member change check when the HTTP status code is 503 or receives a leader/primary change error.
- Only return the latest error in backoffer to ensure the logic of successful retry.

Check List

Tests

  • Unit test
  • Integration test

Release note

None.

@JmPotato JmPotato added the component/client Client logic. label May 29, 2024
Copy link
Contributor

ti-chi-bot bot commented May 29, 2024

[REVIEW NOTIFICATION]

This pull request has not been approved.

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot bot added the release-note-none Denotes a PR that doesn't merit a release note. label May 29, 2024
@ti-chi-bot ti-chi-bot bot requested a review from nolouch May 29, 2024 03:30
@ti-chi-bot ti-chi-bot bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label May 29, 2024
Copy link

codecov bot commented May 29, 2024

Codecov Report

Attention: Patch coverage is 95.12195% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 77.27%. Comparing base (c498063) to head (d952e06).

Current head d952e06 differs from pull request most recent head 541981c

Please upload reports for the commit 541981c to get more accurate results.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8223      +/-   ##
==========================================
+ Coverage   77.25%   77.27%   +0.02%     
==========================================
  Files         471      471              
  Lines       61339    61361      +22     
==========================================
+ Hits        47385    47418      +33     
+ Misses      10382    10376       -6     
+ Partials     3572     3567       -5     
Flag Coverage Δ
unittests 77.27% <95.12%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@JmPotato
Copy link
Member Author

/hold

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 29, 2024
@JmPotato
Copy link
Member Author

/unhold

@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels May 29, 2024
@JmPotato JmPotato requested review from rleungx and HuSharp May 29, 2024 05:38
client/http/client.go Outdated Show resolved Hide resolved
Copy link
Contributor

ti-chi-bot bot commented May 30, 2024

@okJiang: Thanks for your review. The bot only counts approvals from reviewers and higher roles in list, but you're still welcome to leave your comments.

In response to this:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 30, 2024
@JmPotato JmPotato changed the title client/http: handle 503 HTTP code to schedule member change check client/http: handle 503/leader/primary change to schedule member check May 30, 2024
client/http/request_info.go Outdated Show resolved Hide resolved
client/http/client.go Outdated Show resolved Hide resolved
Signed-off-by: JmPotato <[email protected]>
@JmPotato JmPotato closed this May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/client Client logic. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants